package com.ruoyi.project.system.personnel.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.personnel.domain.Apply;
import com.ruoyi.project.system.personnel.mapper.ApplyMapper;
import com.ruoyi.project.system.personnel.service.IApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 申请   业务层
 * @author LHF
 */
@Service
public class ApplyServiceImpl implements IApplyService {

    @Autowired
    private ApplyMapper applyMapper;

    @Override
    public List<Apply> queryAllApply(String title, String applicant) {
        return applyMapper.selectAllApply(title, applicant);
    }

    @Override
    public int deleteInfo(String ids) {
        return applyMapper.deleteApplyById(Convert.toStrArray(ids));
    }

    @Override
    public int addSubmit(Apply apply) {
        return applyMapper.addSubmit(apply);
    }

    @Override
    public Apply selectApplyById(Long applyId) {
        return applyMapper.selectApplyById(applyId);
    }

    @Override
    public int updateApply(Apply apply) {
        return applyMapper.updateApply(apply);
    }
}
